package com.baipiao.permission.backend.entity.sys;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

/**
 * <p>
 *
 * </p>
 *
 * @author Livi Luo
 * @since 2023-12-01
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("user")
@Schema(name = "UserEntity对象", description = "")
public class UserEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "自增id", accessMode = READ_ONLY)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "昵称")
    @TableField("names")
    private String names;

    @Schema(description = "账号")
    @TableField("account")
    private String account;

    @Schema(description = "密码")
    @TableField("pwd")
    private String pwd;

    @Schema(description = "个性签名")
    @TableField("about")
    private String about;

    @Schema(description = "电话")
    @TableField("phone")
    private String phone;

    @Schema(description = "邮箱地址")
    @TableField("email")
    private String email;

    @Schema(description = "出生日期")
    @TableField("birth_date")
    private LocalDateTime birthDate;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "账户是否可用，0为false，1为true")
    @TableField("enable")
    private Boolean enable;

    @Schema(description = "是否解锁，0为false，1为true")
    @TableField("unlocked")
    private Boolean unlocked;

    @Schema(description = "最后登录时间")
    @TableField("last_login_date")
    private LocalDateTime lastLoginDate;

    @Schema(description = "user.id")
    @TableField("update_by")
    private Integer updateBy;

    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateDate;

    @Schema(description = "user.id")
    @TableField("create_by")
    private Integer createBy;

    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private LocalDateTime createDate;


}
